<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0,maximum-scale=1,user-scalable=no">
    <title>显示网络场景</title>
    <style>
        html,body,#viewDiv {
            padding: 0;
            margin: 0;
            height: 100%;
            width: 100%;
        }
    </style>
    <link rel="stylesheet" href="https://js.arcgis.com/4.17/esri/css/main.css">
    <script src="https://js.arcgis.com/4.17/"></script>
    <script>
        require([
            'esri/WebScene',
            'esri/views/SceneView',
            "esri/widgets/Legend"
        ],function(
            WebScene,
            secneView,
            Legend
        ) {
            var webscene = new WebScene({
                portalItem:{
                    id:"579f97b2f3b94d4a8e48a5f140a6639b"
                }
            });

            var view = new secneView({
                container:"viewDiv",
                map:webscene
            });

            // 添加图例
            var legend = new Legend({
                view: view
            });
            view.ui.add(legend, "top-right");
        })
    </script>
</head>
<body>
    <div id="viewDiv"></div>
</body>
</html>